' This program exported from BASIC Anywhere Machine (Version [5.2.3].[2023.12.16.16.28]) on 2024.03.21 at 02:29 (Coordinated Universal Time)
' Program by Charlie Veniot
' Using DRAW to create "capsule" shapes
' Created with the "development" version (i.e. "pre-release") of BAM, changes to DRAW statement:
' allow floating point values for angles
' fix a rounding error causing an extra pixel in angles that are straight right or straight down


StartDrawing:

  SCREEN _NEWIMAGE(201,121,12) 

  COLOR 14
  FOR a# = 0 to 360 STEP 20
      DRAW "B M100,80"
      DRAW "B TA" + a# + " U20"
      SLEEP 0.01
      DRAW "N L70"
      SLEEP 0.01
      DRAW "N R70"
      SLEEP 0.01
  NEXT a#

  PRINT "PRESS A KEY OR" : PRINT "CLICK/TOUCH THE SCREEN" : PRINT "TO CONTINUE"
  SLEEP
  CLS
  
  FOR a# = 0 to 360 STEP 20
      DRAW "B M100,80"
      COLOR 15
      DRAW "TA" + a# + " U20
      SLEEP 0.75
      COLOR 12
      DRAW "N L70"
      SLEEP 0.75
      COLOR 11
      DRAW "N R70"
      SLEEP 0.75
  NEXT a#

  PRINT "PRESS A KEY OR" : PRINT "CLICK/TOUCH THE SCREEN" : PRINT "TO CONTINUE"
  SLEEP
  CLS
  
  COLOR 14
  FOR a# = 0 to 360 STEP 1
      DRAW "B M100,80"
      DRAW "B TA" + a# + " U20"
      SLEEP 0.01
      DRAW "N L70"
      SLEEP 0.01
      DRAW "N R70"
      SLEEP 0.01
  NEXT a#

  PRINT "PRESS A KEY OR" : PRINT "CLICK/TOUCH THE SCREEN" : PRINT "TO CONTINUE"
  SLEEP
  CLS

  SCREEN _NEWIMAGE(201,261,12) 
  
  COLOR 14
  FOR a2# = 0 TO 360 STEP 30
  FOR a# = 0 to 360 STEP 20
      DRAW "B M100,160"
      DRAW "B TA" + a# + " U20"
      SLEEP 0.001
      DRAW "TA" + a2# + " N L70"
      SLEEP 0.001
      DRAW "TA" + a2# + " N R70"
      SLEEP 0.001
  NEXT a#
  NEXT a2#

  PRINT "PRESS A KEY OR" : PRINT "CLICK/TOUCH THE SCREEN" : PRINT "TO CONTINUE"
  SLEEP
  CLS
  
GOTO StartDrawing